import { SpriteFrame } from "cc";

export type skillType = {
    id: number // 技能id
    type: "active" | "passive", // 技能类型(主动技能/被动技能)
    name: string,  // 技能名称
    description: string, // 技能描述
    icon: string | SpriteFrame, // 技能图标
    level: number, // 技能等级
    coolingTime: number, // 冷却时间
    duration?: number, // 持续时间
    buffs?: Array<any>, // 技能buff
}
export const SkillData: skillType[] = [
    {
        id: 1,
        type: "passive",
        name: "火球术",
        description: "发射火球攻击敌人，造成火焰伤害。并持续燃烧",
        icon: "fire",
        level: 1,
        coolingTime: 3,
        duration: 2,
        buffs: [{ id: 1, skillId: 1, duration: 3, description: "持续造成火焰伤害" }]
    },
    {
        id: 2,
        type: "passive",
        name: "闪电",
        description: "范围内召唤闪电攻击敌人，造成伤害。并短暂减速敌人",
        icon: "eletric",
        level: 1,
        coolingTime: 4,
        duration: 1,
        buffs: [{ id: 2, skillId: 2, duration: 2, description: "短暂减速敌人" }]
    },
    {
        id: 3,
        type: "passive",
        name: "冰冻术",
        description: "范围内召唤冰冻效果，冰冻敌人并造成伤害",
        icon: "frozen",
        level: 1,
        coolingTime: 10,
        duration: 3,
    },
    {
        id: 4,
        type: "passive",
        name: "治愈",
        description: "缓慢恢复生命值",
        icon: "cure",
        level: 1,
        coolingTime: 5,
        duration: 1,
    },
    {
        id: 5,
        type: "passive",
        name: "旋转小刀",
        description: "旋转的小刀围绕玩家，对敌人造成伤害",
        icon: "dragon",
        level: 1,
        coolingTime: 0,
    },
    {
        id: 6,
        type: "passive",
        name: "护盾",
        description: "护盾，免受伤害",
        icon: "Shield",
        level: 1,
        coolingTime: 15,
        duration: 5
    },
    {
        id: 7,
        type: "active",
        name: "动感光波",
        description: "手动技能：对路径上的敌人，造成极高的伤害。",
        icon: "LightWave",
        level: -1,
        coolingTime: 30,
        duration: 5
    }
];